home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************************/
- /* */
- /* Module Name: OtherFunction601 */
- /* */
- /* File Name: OtherFunction601.c */
- /* */
- /* © Apple Computer, Inc. 1995 */
- /* All Rights Reserved */
- /* */
- /* Revision History: */
- /* */
- /* Date Who Modification */
- /* */
- /* 1995-01-27 Jaakko Railo Original version */
- /* */
- /************************************************************************************************/
-
- /****************************************** DESCRIPTION ******************************************
-
- *************************************************************************************************/
-
- /******************************************** HEADERS *******************************************/
-
- #ifndef __TELEPHONES__
- #include "Telephones.h"
- #endif
-
- #include "TelOther601.h"
-
- #include "TestModule.h"
-
- /****************************************** DEFINITIONS *****************************************/
-
- /****************************************** PROTOTYPES ******************************************/
-
- void DoTest (CHRSPtr paramPtr);
-
- /************************************************************************************************/
- /************************************************************************************************/
-
-
- pascal short TestModule (CHRSPtr paramPtr)
- {
- short returnValue = noErr;
-
- if (paramPtr->version <= kTestModuleVersion) {
-
- DoTest (paramPtr);
-
- }
- else
- returnValue = kWrongVersion;
-
- return (returnValue);
- }
-
-
- void DoTest (CHRSPtr paramPtr)
- {
- TELHandle termHand = GetCurrentTELHandle (paramPtr);
- OSErr errCode;
- TELToolDeviceInfoPtr paramBlock;
-
- paramBlock = (TELToolDeviceInfoPtr) NewPtr (sizeof(TELToolDeviceInfoRecord));
- if (paramBlock != NULL) {
- paramBlock->csCode = kTELOtherToolDeviceInfo;
- if ((errCode = TELOtherFunction (termHand, (Ptr) paramBlock, sizeof(TELToolDeviceInfoRecord))) == noErr) {
- Print (paramPtr, "csCode = %d", paramBlock->csCode);
- Print (paramPtr, "structVersion = %d", paramBlock->structVersion);
- Print (paramPtr, "toolManufacturer = %c%c%c%c", (paramBlock->toolManufacturer >> 24),
- (paramBlock->toolManufacturer >> 16),
- (paramBlock->toolManufacturer >> 8),
- paramBlock->toolManufacturer);
- Print (paramPtr, "toolDeviceType = %c%c%c%c", (paramBlock->toolDeviceType >> 24),
- (paramBlock->toolDeviceType >> 16),
- (paramBlock->toolDeviceType >> 8),
- paramBlock->toolDeviceType);
- Print (paramPtr, "deviceVersionNumber = %d", paramBlock->deviceVersionNumber);
- Print (paramPtr, "CountryCode = %d", paramBlock->CountryCode);
- Print (paramPtr, "toolManufacturerName = %P", paramBlock->toolManufacturerName);
- Print (paramPtr, "toolDeviceName = %P", paramBlock->toolDeviceName);
- }
- else
- Print (paramPtr, "### TELOtherFunction failed : %d", errCode);
- DisposePtr ((Ptr) paramBlock);
- }
- }
-